package com.mnf.gui.main;

import java.util.Locale;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;

public class MusicServer extends Application {
	@Override
	public void start(Stage primaryStage) {
		try {
			// This line to resolve keys against Bundle.properties
			ResourceBundle viBundle = ResourceBundle.getBundle("lang.Bundle",
					new Locale("en", "US"));
			// This line to resolve keys against Bundle_fr_FR.properties
			AnchorPane page = (AnchorPane) FXMLLoader.load(
					MusicServer.class.getResource("Sample.fxml"), viBundle);
			Scene scene = new Scene(page);
			primaryStage.setScene(scene);
			primaryStage.setTitle(viBundle.getString("application.title"));
			// primaryStage.initStyle(StageStyle.UNDECORATED);
			primaryStage.show();
		} catch (Exception ex) {
			Logger.getLogger(MusicServer.class.getName()).log(Level.SEVERE,
					null, ex);
		}
	}

	public static void main(String[] args) {
		Application.launch(MusicServer.class, (java.lang.String[]) null);
	}
}
